home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 32 / anagram.zip / ANA.DOC < prev    next >
Text File  |  1986-05-26  |  946b  |  18 lines

  1.      The ana program will ask you to type in a beginning word.  It will then
  2. begin generating all permutations of the letters. the way I did it was to
  3. write a recursive routine to rotate the letters. This generates the
  4. permutations in an inverted tree. Example;
  5.  
  6.                              abc (Beginning word)
  7.                  |------------|------------|
  8.                 abc          bca          cab
  9.               /     \       /    \       /    \
  10.              abc    acb    bca   bac    cab   cba
  11.  
  12.      You will notice that the left side of every tree is a duplicate of the
  13. root. I had to use a first time switch to prune out the duplicates. You can
  14. send the output to a file by typing 'ana > file.txt' from the dos prompt.
  15. Note: if you do this the beginning prompt will be written to the file also
  16. and will not be displayed on the screen.  The program will still be waiting
  17. for input, so just type in your beginning word.
  18.